"use strict";
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.scip = void 0;
/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 0.0.0
 * source: scip.proto
 * git: https://github.com/thesayyn/protoc-gen-ts */
const pb_1 = require("google-protobuf");
var scip;
(function (scip) {
    var _Index_one_of_decls, _Metadata_one_of_decls, _ToolInfo_one_of_decls, _Document_one_of_decls, _Symbol_one_of_decls, _Package_one_of_decls, _Descriptor_one_of_decls, _SymbolInformation_one_of_decls, _Relationship_one_of_decls, _Occurrence_one_of_decls, _Diagnostic_one_of_decls;
    let ProtocolVersion;
    (function (ProtocolVersion) {
        ProtocolVersion[ProtocolVersion["UnspecifiedProtocolVersion"] = 0] = "UnspecifiedProtocolVersion";
    })(ProtocolVersion = scip.ProtocolVersion || (scip.ProtocolVersion = {}));
    let TextEncoding;
    (function (TextEncoding) {
        TextEncoding[TextEncoding["UnspecifiedTextEncoding"] = 0] = "UnspecifiedTextEncoding";
        TextEncoding[TextEncoding["UTF8"] = 1] = "UTF8";
        TextEncoding[TextEncoding["UTF16"] = 2] = "UTF16";
    })(TextEncoding = scip.TextEncoding || (scip.TextEncoding = {}));
    let SymbolRole;
    (function (SymbolRole) {
        SymbolRole[SymbolRole["UnspecifiedSymbolRole"] = 0] = "UnspecifiedSymbolRole";
        SymbolRole[SymbolRole["Definition"] = 1] = "Definition";
        SymbolRole[SymbolRole["Import"] = 2] = "Import";
        SymbolRole[SymbolRole["WriteAccess"] = 4] = "WriteAccess";
        SymbolRole[SymbolRole["ReadAccess"] = 8] = "ReadAccess";
        SymbolRole[SymbolRole["Generated"] = 16] = "Generated";
        SymbolRole[SymbolRole["Test"] = 32] = "Test";
    })(SymbolRole = scip.SymbolRole || (scip.SymbolRole = {}));
    let SyntaxKind;
    (function (SyntaxKind) {
        SyntaxKind[SyntaxKind["UnspecifiedSyntaxKind"] = 0] = "UnspecifiedSyntaxKind";
        SyntaxKind[SyntaxKind["Comment"] = 1] = "Comment";
        SyntaxKind[SyntaxKind["PunctuationDelimiter"] = 2] = "PunctuationDelimiter";
        SyntaxKind[SyntaxKind["PunctuationBracket"] = 3] = "PunctuationBracket";
        SyntaxKind[SyntaxKind["Keyword"] = 4] = "Keyword";
        /** @deprecated*/
        SyntaxKind[SyntaxKind["IdentifierKeyword"] = 4] = "IdentifierKeyword";
        SyntaxKind[SyntaxKind["IdentifierOperator"] = 5] = "IdentifierOperator";
        SyntaxKind[SyntaxKind["Identifier"] = 6] = "Identifier";
        SyntaxKind[SyntaxKind["IdentifierBuiltin"] = 7] = "IdentifierBuiltin";
        SyntaxKind[SyntaxKind["IdentifierNull"] = 8] = "IdentifierNull";
        SyntaxKind[SyntaxKind["IdentifierConstant"] = 9] = "IdentifierConstant";
        SyntaxKind[SyntaxKind["IdentifierMutableGlobal"] = 10] = "IdentifierMutableGlobal";
        SyntaxKind[SyntaxKind["IdentifierParameter"] = 11] = "IdentifierParameter";
        SyntaxKind[SyntaxKind["IdentifierLocal"] = 12] = "IdentifierLocal";
        SyntaxKind[SyntaxKind["IdentifierShadowed"] = 13] = "IdentifierShadowed";
        SyntaxKind[SyntaxKind["IdentifierNamespace"] = 14] = "IdentifierNamespace";
        /** @deprecated*/
        SyntaxKind[SyntaxKind["IdentifierModule"] = 14] = "IdentifierModule";
        SyntaxKind[SyntaxKind["IdentifierFunction"] = 15] = "IdentifierFunction";
        SyntaxKind[SyntaxKind["IdentifierFunctionDefinition"] = 16] = "IdentifierFunctionDefinition";
        SyntaxKind[SyntaxKind["IdentifierMacro"] = 17] = "IdentifierMacro";
        SyntaxKind[SyntaxKind["IdentifierMacroDefinition"] = 18] = "IdentifierMacroDefinition";
        SyntaxKind[SyntaxKind["IdentifierType"] = 19] = "IdentifierType";
        SyntaxKind[SyntaxKind["IdentifierBuiltinType"] = 20] = "IdentifierBuiltinType";
        SyntaxKind[SyntaxKind["IdentifierAttribute"] = 21] = "IdentifierAttribute";
        SyntaxKind[SyntaxKind["RegexEscape"] = 22] = "RegexEscape";
        SyntaxKind[SyntaxKind["RegexRepeated"] = 23] = "RegexRepeated";
        SyntaxKind[SyntaxKind["RegexWildcard"] = 24] = "RegexWildcard";
        SyntaxKind[SyntaxKind["RegexDelimiter"] = 25] = "RegexDelimiter";
        SyntaxKind[SyntaxKind["RegexJoin"] = 26] = "RegexJoin";
        SyntaxKind[SyntaxKind["StringLiteral"] = 27] = "StringLiteral";
        SyntaxKind[SyntaxKind["StringLiteralEscape"] = 28] = "StringLiteralEscape";
        SyntaxKind[SyntaxKind["StringLiteralSpecial"] = 29] = "StringLiteralSpecial";
        SyntaxKind[SyntaxKind["StringLiteralKey"] = 30] = "StringLiteralKey";
        SyntaxKind[SyntaxKind["CharacterLiteral"] = 31] = "CharacterLiteral";
        SyntaxKind[SyntaxKind["NumericLiteral"] = 32] = "NumericLiteral";
        SyntaxKind[SyntaxKind["BooleanLiteral"] = 33] = "BooleanLiteral";
        SyntaxKind[SyntaxKind["Tag"] = 34] = "Tag";
        SyntaxKind[SyntaxKind["TagAttribute"] = 35] = "TagAttribute";
        SyntaxKind[SyntaxKind["TagDelimiter"] = 36] = "TagDelimiter";
    })(SyntaxKind = scip.SyntaxKind || (scip.SyntaxKind = {}));
    let Severity;
    (function (Severity) {
        Severity[Severity["UnspecifiedSeverity"] = 0] = "UnspecifiedSeverity";
        Severity[Severity["Error"] = 1] = "Error";
        Severity[Severity["Warning"] = 2] = "Warning";
        Severity[Severity["Information"] = 3] = "Information";
        Severity[Severity["Hint"] = 4] = "Hint";
    })(Severity = scip.Severity || (scip.Severity = {}));
    let DiagnosticTag;
    (function (DiagnosticTag) {
        DiagnosticTag[DiagnosticTag["UnspecifiedDiagnosticTag"] = 0] = "UnspecifiedDiagnosticTag";
        DiagnosticTag[DiagnosticTag["Unnecessary"] = 1] = "Unnecessary";
        DiagnosticTag[DiagnosticTag["Deprecated"] = 2] = "Deprecated";
    })(DiagnosticTag = scip.DiagnosticTag || (scip.DiagnosticTag = {}));
    let Language;
    (function (Language) {
        Language[Language["UnspecifiedLanguage"] = 0] = "UnspecifiedLanguage";
        Language[Language["ABAP"] = 60] = "ABAP";
        Language[Language["APL"] = 49] = "APL";
        Language[Language["Ada"] = 39] = "Ada";
        Language[Language["Agda"] = 45] = "Agda";
        Language[Language["AsciiDoc"] = 86] = "AsciiDoc";
        Language[Language["Assembly"] = 58] = "Assembly";
        Language[Language["Awk"] = 66] = "Awk";
        Language[Language["Bat"] = 68] = "Bat";
        Language[Language["BibTeX"] = 81] = "BibTeX";
        Language[Language["C"] = 34] = "C";
        Language[Language["COBOL"] = 59] = "COBOL";
        Language[Language["CPP"] = 35] = "CPP";
        Language[Language["CSS"] = 26] = "CSS";
        Language[Language["CSharp"] = 1] = "CSharp";
        Language[Language["Clojure"] = 8] = "Clojure";
        Language[Language["Coffeescript"] = 21] = "Coffeescript";
        Language[Language["CommonLisp"] = 9] = "CommonLisp";
        Language[Language["Coq"] = 47] = "Coq";
        Language[Language["Dart"] = 3] = "Dart";
        Language[Language["Delphi"] = 57] = "Delphi";
        Language[Language["Diff"] = 88] = "Diff";
        Language[Language["Dockerfile"] = 80] = "Dockerfile";
        Language[Language["Dyalog"] = 50] = "Dyalog";
        Language[Language["Elixir"] = 17] = "Elixir";
        Language[Language["Erlang"] = 18] = "Erlang";
        Language[Language["FSharp"] = 42] = "FSharp";
        Language[Language["Fish"] = 65] = "Fish";
        Language[Language["Flow"] = 24] = "Flow";
        Language[Language["Fortran"] = 56] = "Fortran";
        Language[Language["Git_Commit"] = 91] = "Git_Commit";
        Language[Language["Git_Config"] = 89] = "Git_Config";
        Language[Language["Git_Rebase"] = 92] = "Git_Rebase";
        Language[Language["Go"] = 33] = "Go";
        Language[Language["Groovy"] = 7] = "Groovy";
        Language[Language["HTML"] = 30] = "HTML";
        Language[Language["Hack"] = 20] = "Hack";
        Language[Language["Handlebars"] = 90] = "Handlebars";
        Language[Language["Haskell"] = 44] = "Haskell";
        Language[Language["Idris"] = 46] = "Idris";
        Language[Language["Ini"] = 72] = "Ini";
        Language[Language["J"] = 51] = "J";
        Language[Language["JSON"] = 75] = "JSON";
        Language[Language["Java"] = 6] = "Java";
        Language[Language["JavaScript"] = 22] = "JavaScript";
        Language[Language["JavaScriptReact"] = 93] = "JavaScriptReact";
        Language[Language["Jsonnet"] = 76] = "Jsonnet";
        Language[Language["Julia"] = 55] = "Julia";
        Language[Language["Kotlin"] = 4] = "Kotlin";
        Language[Language["LaTeX"] = 83] = "LaTeX";
        Language[Language["Lean"] = 48] = "Lean";
        Language[Language["Less"] = 27] = "Less";
        Language[Language["Lua"] = 12] = "Lua";
        Language[Language["Makefile"] = 79] = "Makefile";
        Language[Language["Markdown"] = 84] = "Markdown";
        Language[Language["Matlab"] = 52] = "Matlab";
        Language[Language["Nix"] = 77] = "Nix";
        Language[Language["OCaml"] = 41] = "OCaml";
        Language[Language["Objective_C"] = 36] = "Objective_C";
        Language[Language["Objective_CPP"] = 37] = "Objective_CPP";
        Language[Language["PHP"] = 19] = "PHP";
        Language[Language["PLSQL"] = 70] = "PLSQL";
        Language[Language["Perl"] = 13] = "Perl";
        Language[Language["PowerShell"] = 67] = "PowerShell";
        Language[Language["Prolog"] = 71] = "Prolog";
        Language[Language["Python"] = 15] = "Python";
        Language[Language["R"] = 54] = "R";
        Language[Language["Racket"] = 11] = "Racket";
        Language[Language["Raku"] = 14] = "Raku";
        Language[Language["Razor"] = 62] = "Razor";
        Language[Language["ReST"] = 85] = "ReST";
        Language[Language["Ruby"] = 16] = "Ruby";
        Language[Language["Rust"] = 40] = "Rust";
        Language[Language["SAS"] = 61] = "SAS";
        Language[Language["SCSS"] = 29] = "SCSS";
        Language[Language["SML"] = 43] = "SML";
        Language[Language["SQL"] = 69] = "SQL";
        Language[Language["Sass"] = 28] = "Sass";
        Language[Language["Scala"] = 5] = "Scala";
        Language[Language["Scheme"] = 10] = "Scheme";
        Language[Language["ShellScript"] = 64] = "ShellScript";
        Language[Language["Skylark"] = 78] = "Skylark";
        Language[Language["Swift"] = 2] = "Swift";
        Language[Language["TOML"] = 73] = "TOML";
        Language[Language["TeX"] = 82] = "TeX";
        Language[Language["TypeScript"] = 23] = "TypeScript";
        Language[Language["TypeScriptReact"] = 94] = "TypeScriptReact";
        Language[Language["VisualBasic"] = 63] = "VisualBasic";
        Language[Language["Vue"] = 25] = "Vue";
        Language[Language["Wolfram"] = 53] = "Wolfram";
        Language[Language["XML"] = 31] = "XML";
        Language[Language["XSL"] = 32] = "XSL";
        Language[Language["YAML"] = 74] = "YAML";
        Language[Language["Zig"] = 38] = "Zig";
    })(Language = scip.Language || (scip.Language = {}));
    class Index extends pb_1.Message {
        constructor(data) {
            super();
            _Index_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], __classPrivateFieldGet(this, _Index_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("metadata" in data && data.metadata != undefined) {
                    this.metadata = data.metadata;
                }
                if ("documents" in data && data.documents != undefined) {
                    this.documents = data.documents;
                }
                if ("external_symbols" in data && data.external_symbols != undefined) {
                    this.external_symbols = data.external_symbols;
                }
            }
        }
        get metadata() {
            return pb_1.Message.getWrapperField(this, Metadata, 1);
        }
        set metadata(value) {
            pb_1.Message.setWrapperField(this, 1, value);
        }
        get has_metadata() {
            return pb_1.Message.getField(this, 1) != null;
        }
        get documents() {
            return pb_1.Message.getRepeatedWrapperField(this, Document, 2);
        }
        set documents(value) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        get external_symbols() {
            return pb_1.Message.getRepeatedWrapperField(this, SymbolInformation, 3);
        }
        set external_symbols(value) {
            pb_1.Message.setRepeatedWrapperField(this, 3, value);
        }
        static fromObject(data) {
            const message = new Index({});
            if (data.metadata != null) {
                message.metadata = Metadata.fromObject(data.metadata);
            }
            if (data.documents != null) {
                message.documents = data.documents.map(item => Document.fromObject(item));
            }
            if (data.external_symbols != null) {
                message.external_symbols = data.external_symbols.map(item => SymbolInformation.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.metadata != null) {
                data.metadata = this.metadata.toObject();
            }
            if (this.documents != null) {
                data.documents = this.documents.map((item) => item.toObject());
            }
            if (this.external_symbols != null) {
                data.external_symbols = this.external_symbols.map((item) => item.toObject());
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.has_metadata)
                writer.writeMessage(1, this.metadata, () => this.metadata.serialize(writer));
            if (this.documents.length)
                writer.writeRepeatedMessage(2, this.documents, (item) => item.serialize(writer));
            if (this.external_symbols.length)
                writer.writeRepeatedMessage(3, this.external_symbols, (item) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Index();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.metadata, () => message.metadata = Metadata.deserialize(reader));
                        break;
                    case 2:
                        reader.readMessage(message.documents, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Document.deserialize(reader), Document));
                        break;
                    case 3:
                        reader.readMessage(message.external_symbols, () => pb_1.Message.addToRepeatedWrapperField(message, 3, SymbolInformation.deserialize(reader), SymbolInformation));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Index.deserialize(bytes);
        }
    }
    _Index_one_of_decls = new WeakMap();
    scip.Index = Index;
    class Metadata extends pb_1.Message {
        constructor(data) {
            super();
            _Metadata_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Metadata_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("version" in data && data.version != undefined) {
                    this.version = data.version;
                }
                if ("tool_info" in data && data.tool_info != undefined) {
                    this.tool_info = data.tool_info;
                }
                if ("project_root" in data && data.project_root != undefined) {
                    this.project_root = data.project_root;
                }
                if ("text_document_encoding" in data && data.text_document_encoding != undefined) {
                    this.text_document_encoding = data.text_document_encoding;
                }
            }
        }
        get version() {
            return pb_1.Message.getFieldWithDefault(this, 1, ProtocolVersion.UnspecifiedProtocolVersion);
        }
        set version(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get tool_info() {
            return pb_1.Message.getWrapperField(this, ToolInfo, 2);
        }
        set tool_info(value) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        get has_tool_info() {
            return pb_1.Message.getField(this, 2) != null;
        }
        get project_root() {
            return pb_1.Message.getFieldWithDefault(this, 3, "");
        }
        set project_root(value) {
            pb_1.Message.setField(this, 3, value);
        }
        get text_document_encoding() {
            return pb_1.Message.getFieldWithDefault(this, 4, TextEncoding.UnspecifiedTextEncoding);
        }
        set text_document_encoding(value) {
            pb_1.Message.setField(this, 4, value);
        }
        static fromObject(data) {
            const message = new Metadata({});
            if (data.version != null) {
                message.version = data.version;
            }
            if (data.tool_info != null) {
                message.tool_info = ToolInfo.fromObject(data.tool_info);
            }
            if (data.project_root != null) {
                message.project_root = data.project_root;
            }
            if (data.text_document_encoding != null) {
                message.text_document_encoding = data.text_document_encoding;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.version != null) {
                data.version = this.version;
            }
            if (this.tool_info != null) {
                data.tool_info = this.tool_info.toObject();
            }
            if (this.project_root != null) {
                data.project_root = this.project_root;
            }
            if (this.text_document_encoding != null) {
                data.text_document_encoding = this.text_document_encoding;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.version != ProtocolVersion.UnspecifiedProtocolVersion)
                writer.writeEnum(1, this.version);
            if (this.has_tool_info)
                writer.writeMessage(2, this.tool_info, () => this.tool_info.serialize(writer));
            if (this.project_root.length)
                writer.writeString(3, this.project_root);
            if (this.text_document_encoding != TextEncoding.UnspecifiedTextEncoding)
                writer.writeEnum(4, this.text_document_encoding);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.version = reader.readEnum();
                        break;
                    case 2:
                        reader.readMessage(message.tool_info, () => message.tool_info = ToolInfo.deserialize(reader));
                        break;
                    case 3:
                        message.project_root = reader.readString();
                        break;
                    case 4:
                        message.text_document_encoding = reader.readEnum();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Metadata.deserialize(bytes);
        }
    }
    _Metadata_one_of_decls = new WeakMap();
    scip.Metadata = Metadata;
    class ToolInfo extends pb_1.Message {
        constructor(data) {
            super();
            _ToolInfo_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], __classPrivateFieldGet(this, _ToolInfo_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("version" in data && data.version != undefined) {
                    this.version = data.version;
                }
                if ("arguments" in data && data.arguments != undefined) {
                    this.arguments = data.arguments;
                }
            }
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set name(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get version() {
            return pb_1.Message.getFieldWithDefault(this, 2, "");
        }
        set version(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get arguments() {
            return pb_1.Message.getFieldWithDefault(this, 3, []);
        }
        set arguments(value) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data) {
            const message = new ToolInfo({});
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.version != null) {
                message.version = data.version;
            }
            if (data.arguments != null) {
                message.arguments = data.arguments;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.version != null) {
                data.version = this.version;
            }
            if (this.arguments != null) {
                data.arguments = this.arguments;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.name.length)
                writer.writeString(1, this.name);
            if (this.version.length)
                writer.writeString(2, this.version);
            if (this.arguments.length)
                writer.writeRepeatedString(3, this.arguments);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ToolInfo();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.name = reader.readString();
                        break;
                    case 2:
                        message.version = reader.readString();
                        break;
                    case 3:
                        pb_1.Message.addToRepeatedField(message, 3, reader.readString());
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return ToolInfo.deserialize(bytes);
        }
    }
    _ToolInfo_one_of_decls = new WeakMap();
    scip.ToolInfo = ToolInfo;
    class Document extends pb_1.Message {
        constructor(data) {
            super();
            _Document_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], __classPrivateFieldGet(this, _Document_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("language" in data && data.language != undefined) {
                    this.language = data.language;
                }
                if ("relative_path" in data && data.relative_path != undefined) {
                    this.relative_path = data.relative_path;
                }
                if ("occurrences" in data && data.occurrences != undefined) {
                    this.occurrences = data.occurrences;
                }
                if ("symbols" in data && data.symbols != undefined) {
                    this.symbols = data.symbols;
                }
                if ("text" in data && data.text != undefined) {
                    this.text = data.text;
                }
            }
        }
        get language() {
            return pb_1.Message.getFieldWithDefault(this, 4, "");
        }
        set language(value) {
            pb_1.Message.setField(this, 4, value);
        }
        get relative_path() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set relative_path(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get occurrences() {
            return pb_1.Message.getRepeatedWrapperField(this, Occurrence, 2);
        }
        set occurrences(value) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        get symbols() {
            return pb_1.Message.getRepeatedWrapperField(this, SymbolInformation, 3);
        }
        set symbols(value) {
            pb_1.Message.setRepeatedWrapperField(this, 3, value);
        }
        get text() {
            return pb_1.Message.getFieldWithDefault(this, 5, "");
        }
        set text(value) {
            pb_1.Message.setField(this, 5, value);
        }
        static fromObject(data) {
            const message = new Document({});
            if (data.language != null) {
                message.language = data.language;
            }
            if (data.relative_path != null) {
                message.relative_path = data.relative_path;
            }
            if (data.occurrences != null) {
                message.occurrences = data.occurrences.map(item => Occurrence.fromObject(item));
            }
            if (data.symbols != null) {
                message.symbols = data.symbols.map(item => SymbolInformation.fromObject(item));
            }
            if (data.text != null) {
                message.text = data.text;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.language != null) {
                data.language = this.language;
            }
            if (this.relative_path != null) {
                data.relative_path = this.relative_path;
            }
            if (this.occurrences != null) {
                data.occurrences = this.occurrences.map((item) => item.toObject());
            }
            if (this.symbols != null) {
                data.symbols = this.symbols.map((item) => item.toObject());
            }
            if (this.text != null) {
                data.text = this.text;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.language.length)
                writer.writeString(4, this.language);
            if (this.relative_path.length)
                writer.writeString(1, this.relative_path);
            if (this.occurrences.length)
                writer.writeRepeatedMessage(2, this.occurrences, (item) => item.serialize(writer));
            if (this.symbols.length)
                writer.writeRepeatedMessage(3, this.symbols, (item) => item.serialize(writer));
            if (this.text.length)
                writer.writeString(5, this.text);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Document();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 4:
                        message.language = reader.readString();
                        break;
                    case 1:
                        message.relative_path = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.occurrences, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Occurrence.deserialize(reader), Occurrence));
                        break;
                    case 3:
                        reader.readMessage(message.symbols, () => pb_1.Message.addToRepeatedWrapperField(message, 3, SymbolInformation.deserialize(reader), SymbolInformation));
                        break;
                    case 5:
                        message.text = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Document.deserialize(bytes);
        }
    }
    _Document_one_of_decls = new WeakMap();
    scip.Document = Document;
    class Symbol extends pb_1.Message {
        constructor(data) {
            super();
            _Symbol_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], __classPrivateFieldGet(this, _Symbol_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("scheme" in data && data.scheme != undefined) {
                    this.scheme = data.scheme;
                }
                if ("package" in data && data.package != undefined) {
                    this.package = data.package;
                }
                if ("descriptors" in data && data.descriptors != undefined) {
                    this.descriptors = data.descriptors;
                }
            }
        }
        get scheme() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set scheme(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get package() {
            return pb_1.Message.getWrapperField(this, Package, 2);
        }
        set package(value) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        get has_package() {
            return pb_1.Message.getField(this, 2) != null;
        }
        get descriptors() {
            return pb_1.Message.getRepeatedWrapperField(this, Descriptor, 3);
        }
        set descriptors(value) {
            pb_1.Message.setRepeatedWrapperField(this, 3, value);
        }
        static fromObject(data) {
            const message = new Symbol({});
            if (data.scheme != null) {
                message.scheme = data.scheme;
            }
            if (data.package != null) {
                message.package = Package.fromObject(data.package);
            }
            if (data.descriptors != null) {
                message.descriptors = data.descriptors.map(item => Descriptor.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.scheme != null) {
                data.scheme = this.scheme;
            }
            if (this.package != null) {
                data.package = this.package.toObject();
            }
            if (this.descriptors != null) {
                data.descriptors = this.descriptors.map((item) => item.toObject());
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.scheme.length)
                writer.writeString(1, this.scheme);
            if (this.has_package)
                writer.writeMessage(2, this.package, () => this.package.serialize(writer));
            if (this.descriptors.length)
                writer.writeRepeatedMessage(3, this.descriptors, (item) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Symbol();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.scheme = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.package, () => message.package = Package.deserialize(reader));
                        break;
                    case 3:
                        reader.readMessage(message.descriptors, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Descriptor.deserialize(reader), Descriptor));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Symbol.deserialize(bytes);
        }
    }
    _Symbol_one_of_decls = new WeakMap();
    scip.Symbol = Symbol;
    class Package extends pb_1.Message {
        constructor(data) {
            super();
            _Package_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Package_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("manager" in data && data.manager != undefined) {
                    this.manager = data.manager;
                }
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("version" in data && data.version != undefined) {
                    this.version = data.version;
                }
            }
        }
        get manager() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set manager(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 2, "");
        }
        set name(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get version() {
            return pb_1.Message.getFieldWithDefault(this, 3, "");
        }
        set version(value) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data) {
            const message = new Package({});
            if (data.manager != null) {
                message.manager = data.manager;
            }
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.version != null) {
                message.version = data.version;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.manager != null) {
                data.manager = this.manager;
            }
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.version != null) {
                data.version = this.version;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.manager.length)
                writer.writeString(1, this.manager);
            if (this.name.length)
                writer.writeString(2, this.name);
            if (this.version.length)
                writer.writeString(3, this.version);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Package();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.manager = reader.readString();
                        break;
                    case 2:
                        message.name = reader.readString();
                        break;
                    case 3:
                        message.version = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Package.deserialize(bytes);
        }
    }
    _Package_one_of_decls = new WeakMap();
    scip.Package = Package;
    class Descriptor extends pb_1.Message {
        constructor(data) {
            super();
            _Descriptor_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Descriptor_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("disambiguator" in data && data.disambiguator != undefined) {
                    this.disambiguator = data.disambiguator;
                }
                if ("suffix" in data && data.suffix != undefined) {
                    this.suffix = data.suffix;
                }
            }
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set name(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get disambiguator() {
            return pb_1.Message.getFieldWithDefault(this, 2, "");
        }
        set disambiguator(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get suffix() {
            return pb_1.Message.getFieldWithDefault(this, 3, Descriptor.Suffix.UnspecifiedSuffix);
        }
        set suffix(value) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data) {
            const message = new Descriptor({});
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.disambiguator != null) {
                message.disambiguator = data.disambiguator;
            }
            if (data.suffix != null) {
                message.suffix = data.suffix;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.disambiguator != null) {
                data.disambiguator = this.disambiguator;
            }
            if (this.suffix != null) {
                data.suffix = this.suffix;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.name.length)
                writer.writeString(1, this.name);
            if (this.disambiguator.length)
                writer.writeString(2, this.disambiguator);
            if (this.suffix != Descriptor.Suffix.UnspecifiedSuffix)
                writer.writeEnum(3, this.suffix);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Descriptor();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.name = reader.readString();
                        break;
                    case 2:
                        message.disambiguator = reader.readString();
                        break;
                    case 3:
                        message.suffix = reader.readEnum();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Descriptor.deserialize(bytes);
        }
    }
    _Descriptor_one_of_decls = new WeakMap();
    scip.Descriptor = Descriptor;
    (function (Descriptor) {
        let Suffix;
        (function (Suffix) {
            Suffix[Suffix["UnspecifiedSuffix"] = 0] = "UnspecifiedSuffix";
            Suffix[Suffix["Namespace"] = 1] = "Namespace";
            /** @deprecated*/
            Suffix[Suffix["Package"] = 1] = "Package";
            Suffix[Suffix["Type"] = 2] = "Type";
            Suffix[Suffix["Term"] = 3] = "Term";
            Suffix[Suffix["Method"] = 4] = "Method";
            Suffix[Suffix["TypeParameter"] = 5] = "TypeParameter";
            Suffix[Suffix["Parameter"] = 6] = "Parameter";
            Suffix[Suffix["Meta"] = 7] = "Meta";
            Suffix[Suffix["Local"] = 8] = "Local";
            Suffix[Suffix["Macro"] = 9] = "Macro";
        })(Suffix = Descriptor.Suffix || (Descriptor.Suffix = {}));
    })(Descriptor = scip.Descriptor || (scip.Descriptor = {}));
    class SymbolInformation extends pb_1.Message {
        constructor(data) {
            super();
            _SymbolInformation_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], __classPrivateFieldGet(this, _SymbolInformation_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("symbol" in data && data.symbol != undefined) {
                    this.symbol = data.symbol;
                }
                if ("documentation" in data && data.documentation != undefined) {
                    this.documentation = data.documentation;
                }
                if ("relationships" in data && data.relationships != undefined) {
                    this.relationships = data.relationships;
                }
                if ("kind" in data && data.kind != undefined) {
                    this.kind = data.kind;
                }
                if ("display_name" in data && data.display_name != undefined) {
                    this.display_name = data.display_name;
                }
                if ("signature_documentation" in data && data.signature_documentation != undefined) {
                    this.signature_documentation = data.signature_documentation;
                }
                if ("enclosing_symbol" in data && data.enclosing_symbol != undefined) {
                    this.enclosing_symbol = data.enclosing_symbol;
                }
            }
        }
        get symbol() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set symbol(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get documentation() {
            return pb_1.Message.getFieldWithDefault(this, 3, []);
        }
        set documentation(value) {
            pb_1.Message.setField(this, 3, value);
        }
        get relationships() {
            return pb_1.Message.getRepeatedWrapperField(this, Relationship, 4);
        }
        set relationships(value) {
            pb_1.Message.setRepeatedWrapperField(this, 4, value);
        }
        get kind() {
            return pb_1.Message.getFieldWithDefault(this, 5, SymbolInformation.Kind.UnspecifiedKind);
        }
        set kind(value) {
            pb_1.Message.setField(this, 5, value);
        }
        get display_name() {
            return pb_1.Message.getFieldWithDefault(this, 6, "");
        }
        set display_name(value) {
            pb_1.Message.setField(this, 6, value);
        }
        get signature_documentation() {
            return pb_1.Message.getWrapperField(this, Document, 7);
        }
        set signature_documentation(value) {
            pb_1.Message.setWrapperField(this, 7, value);
        }
        get has_signature_documentation() {
            return pb_1.Message.getField(this, 7) != null;
        }
        get enclosing_symbol() {
            return pb_1.Message.getFieldWithDefault(this, 8, "");
        }
        set enclosing_symbol(value) {
            pb_1.Message.setField(this, 8, value);
        }
        static fromObject(data) {
            const message = new SymbolInformation({});
            if (data.symbol != null) {
                message.symbol = data.symbol;
            }
            if (data.documentation != null) {
                message.documentation = data.documentation;
            }
            if (data.relationships != null) {
                message.relationships = data.relationships.map(item => Relationship.fromObject(item));
            }
            if (data.kind != null) {
                message.kind = data.kind;
            }
            if (data.display_name != null) {
                message.display_name = data.display_name;
            }
            if (data.signature_documentation != null) {
                message.signature_documentation = Document.fromObject(data.signature_documentation);
            }
            if (data.enclosing_symbol != null) {
                message.enclosing_symbol = data.enclosing_symbol;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.symbol != null) {
                data.symbol = this.symbol;
            }
            if (this.documentation != null) {
                data.documentation = this.documentation;
            }
            if (this.relationships != null) {
                data.relationships = this.relationships.map((item) => item.toObject());
            }
            if (this.kind != null) {
                data.kind = this.kind;
            }
            if (this.display_name != null) {
                data.display_name = this.display_name;
            }
            if (this.signature_documentation != null) {
                data.signature_documentation = this.signature_documentation.toObject();
            }
            if (this.enclosing_symbol != null) {
                data.enclosing_symbol = this.enclosing_symbol;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.symbol.length)
                writer.writeString(1, this.symbol);
            if (this.documentation.length)
                writer.writeRepeatedString(3, this.documentation);
            if (this.relationships.length)
                writer.writeRepeatedMessage(4, this.relationships, (item) => item.serialize(writer));
            if (this.kind != SymbolInformation.Kind.UnspecifiedKind)
                writer.writeEnum(5, this.kind);
            if (this.display_name.length)
                writer.writeString(6, this.display_name);
            if (this.has_signature_documentation)
                writer.writeMessage(7, this.signature_documentation, () => this.signature_documentation.serialize(writer));
            if (this.enclosing_symbol.length)
                writer.writeString(8, this.enclosing_symbol);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SymbolInformation();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.symbol = reader.readString();
                        break;
                    case 3:
                        pb_1.Message.addToRepeatedField(message, 3, reader.readString());
                        break;
                    case 4:
                        reader.readMessage(message.relationships, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Relationship.deserialize(reader), Relationship));
                        break;
                    case 5:
                        message.kind = reader.readEnum();
                        break;
                    case 6:
                        message.display_name = reader.readString();
                        break;
                    case 7:
                        reader.readMessage(message.signature_documentation, () => message.signature_documentation = Document.deserialize(reader));
                        break;
                    case 8:
                        message.enclosing_symbol = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return SymbolInformation.deserialize(bytes);
        }
    }
    _SymbolInformation_one_of_decls = new WeakMap();
    scip.SymbolInformation = SymbolInformation;
    (function (SymbolInformation) {
        let Kind;
        (function (Kind) {
            Kind[Kind["UnspecifiedKind"] = 0] = "UnspecifiedKind";
            Kind[Kind["Array"] = 1] = "Array";
            Kind[Kind["Assertion"] = 2] = "Assertion";
            Kind[Kind["AssociatedType"] = 3] = "AssociatedType";
            Kind[Kind["Attribute"] = 4] = "Attribute";
            Kind[Kind["Axiom"] = 5] = "Axiom";
            Kind[Kind["Boolean"] = 6] = "Boolean";
            Kind[Kind["Class"] = 7] = "Class";
            Kind[Kind["Constant"] = 8] = "Constant";
            Kind[Kind["Constructor"] = 9] = "Constructor";
            Kind[Kind["DataFamily"] = 10] = "DataFamily";
            Kind[Kind["Enum"] = 11] = "Enum";
            Kind[Kind["EnumMember"] = 12] = "EnumMember";
            Kind[Kind["Event"] = 13] = "Event";
            Kind[Kind["Fact"] = 14] = "Fact";
            Kind[Kind["Field"] = 15] = "Field";
            Kind[Kind["File"] = 16] = "File";
            Kind[Kind["Function"] = 17] = "Function";
            Kind[Kind["Getter"] = 18] = "Getter";
            Kind[Kind["Grammar"] = 19] = "Grammar";
            Kind[Kind["Instance"] = 20] = "Instance";
            Kind[Kind["Interface"] = 21] = "Interface";
            Kind[Kind["Key"] = 22] = "Key";
            Kind[Kind["Lang"] = 23] = "Lang";
            Kind[Kind["Lemma"] = 24] = "Lemma";
            Kind[Kind["Macro"] = 25] = "Macro";
            Kind[Kind["Method"] = 26] = "Method";
            Kind[Kind["MethodReceiver"] = 27] = "MethodReceiver";
            Kind[Kind["Message"] = 28] = "Message";
            Kind[Kind["Module"] = 29] = "Module";
            Kind[Kind["Namespace"] = 30] = "Namespace";
            Kind[Kind["Null"] = 31] = "Null";
            Kind[Kind["Number"] = 32] = "Number";
            Kind[Kind["Object"] = 33] = "Object";
            Kind[Kind["Operator"] = 34] = "Operator";
            Kind[Kind["Package"] = 35] = "Package";
            Kind[Kind["PackageObject"] = 36] = "PackageObject";
            Kind[Kind["Parameter"] = 37] = "Parameter";
            Kind[Kind["ParameterLabel"] = 38] = "ParameterLabel";
            Kind[Kind["Pattern"] = 39] = "Pattern";
            Kind[Kind["Predicate"] = 40] = "Predicate";
            Kind[Kind["Property"] = 41] = "Property";
            Kind[Kind["Protocol"] = 42] = "Protocol";
            Kind[Kind["Quasiquoter"] = 43] = "Quasiquoter";
            Kind[Kind["SelfParameter"] = 44] = "SelfParameter";
            Kind[Kind["Setter"] = 45] = "Setter";
            Kind[Kind["Signature"] = 46] = "Signature";
            Kind[Kind["Subscript"] = 47] = "Subscript";
            Kind[Kind["String"] = 48] = "String";
            Kind[Kind["Struct"] = 49] = "Struct";
            Kind[Kind["Tactic"] = 50] = "Tactic";
            Kind[Kind["Theorem"] = 51] = "Theorem";
            Kind[Kind["ThisParameter"] = 52] = "ThisParameter";
            Kind[Kind["Trait"] = 53] = "Trait";
            Kind[Kind["Type"] = 54] = "Type";
            Kind[Kind["TypeAlias"] = 55] = "TypeAlias";
            Kind[Kind["TypeClass"] = 56] = "TypeClass";
            Kind[Kind["TypeFamily"] = 57] = "TypeFamily";
            Kind[Kind["TypeParameter"] = 58] = "TypeParameter";
            Kind[Kind["Union"] = 59] = "Union";
            Kind[Kind["Value"] = 60] = "Value";
            Kind[Kind["Variable"] = 61] = "Variable";
        })(Kind = SymbolInformation.Kind || (SymbolInformation.Kind = {}));
    })(SymbolInformation = scip.SymbolInformation || (scip.SymbolInformation = {}));
    class Relationship extends pb_1.Message {
        constructor(data) {
            super();
            _Relationship_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Relationship_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("symbol" in data && data.symbol != undefined) {
                    this.symbol = data.symbol;
                }
                if ("is_reference" in data && data.is_reference != undefined) {
                    this.is_reference = data.is_reference;
                }
                if ("is_implementation" in data && data.is_implementation != undefined) {
                    this.is_implementation = data.is_implementation;
                }
                if ("is_type_definition" in data && data.is_type_definition != undefined) {
                    this.is_type_definition = data.is_type_definition;
                }
                if ("is_definition" in data && data.is_definition != undefined) {
                    this.is_definition = data.is_definition;
                }
            }
        }
        get symbol() {
            return pb_1.Message.getFieldWithDefault(this, 1, "");
        }
        set symbol(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get is_reference() {
            return pb_1.Message.getFieldWithDefault(this, 2, false);
        }
        set is_reference(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get is_implementation() {
            return pb_1.Message.getFieldWithDefault(this, 3, false);
        }
        set is_implementation(value) {
            pb_1.Message.setField(this, 3, value);
        }
        get is_type_definition() {
            return pb_1.Message.getFieldWithDefault(this, 4, false);
        }
        set is_type_definition(value) {
            pb_1.Message.setField(this, 4, value);
        }
        get is_definition() {
            return pb_1.Message.getFieldWithDefault(this, 5, false);
        }
        set is_definition(value) {
            pb_1.Message.setField(this, 5, value);
        }
        static fromObject(data) {
            const message = new Relationship({});
            if (data.symbol != null) {
                message.symbol = data.symbol;
            }
            if (data.is_reference != null) {
                message.is_reference = data.is_reference;
            }
            if (data.is_implementation != null) {
                message.is_implementation = data.is_implementation;
            }
            if (data.is_type_definition != null) {
                message.is_type_definition = data.is_type_definition;
            }
            if (data.is_definition != null) {
                message.is_definition = data.is_definition;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.symbol != null) {
                data.symbol = this.symbol;
            }
            if (this.is_reference != null) {
                data.is_reference = this.is_reference;
            }
            if (this.is_implementation != null) {
                data.is_implementation = this.is_implementation;
            }
            if (this.is_type_definition != null) {
                data.is_type_definition = this.is_type_definition;
            }
            if (this.is_definition != null) {
                data.is_definition = this.is_definition;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.symbol.length)
                writer.writeString(1, this.symbol);
            if (this.is_reference != false)
                writer.writeBool(2, this.is_reference);
            if (this.is_implementation != false)
                writer.writeBool(3, this.is_implementation);
            if (this.is_type_definition != false)
                writer.writeBool(4, this.is_type_definition);
            if (this.is_definition != false)
                writer.writeBool(5, this.is_definition);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Relationship();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.symbol = reader.readString();
                        break;
                    case 2:
                        message.is_reference = reader.readBool();
                        break;
                    case 3:
                        message.is_implementation = reader.readBool();
                        break;
                    case 4:
                        message.is_type_definition = reader.readBool();
                        break;
                    case 5:
                        message.is_definition = reader.readBool();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Relationship.deserialize(bytes);
        }
    }
    _Relationship_one_of_decls = new WeakMap();
    scip.Relationship = Relationship;
    class Occurrence extends pb_1.Message {
        constructor(data) {
            super();
            _Occurrence_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 4, 6, 7], __classPrivateFieldGet(this, _Occurrence_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("range" in data && data.range != undefined) {
                    this.range = data.range;
                }
                if ("symbol" in data && data.symbol != undefined) {
                    this.symbol = data.symbol;
                }
                if ("symbol_roles" in data && data.symbol_roles != undefined) {
                    this.symbol_roles = data.symbol_roles;
                }
                if ("override_documentation" in data && data.override_documentation != undefined) {
                    this.override_documentation = data.override_documentation;
                }
                if ("syntax_kind" in data && data.syntax_kind != undefined) {
                    this.syntax_kind = data.syntax_kind;
                }
                if ("diagnostics" in data && data.diagnostics != undefined) {
                    this.diagnostics = data.diagnostics;
                }
                if ("enclosing_range" in data && data.enclosing_range != undefined) {
                    this.enclosing_range = data.enclosing_range;
                }
            }
        }
        get range() {
            return pb_1.Message.getFieldWithDefault(this, 1, []);
        }
        set range(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get symbol() {
            return pb_1.Message.getFieldWithDefault(this, 2, "");
        }
        set symbol(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get symbol_roles() {
            return pb_1.Message.getFieldWithDefault(this, 3, 0);
        }
        set symbol_roles(value) {
            pb_1.Message.setField(this, 3, value);
        }
        get override_documentation() {
            return pb_1.Message.getFieldWithDefault(this, 4, []);
        }
        set override_documentation(value) {
            pb_1.Message.setField(this, 4, value);
        }
        get syntax_kind() {
            return pb_1.Message.getFieldWithDefault(this, 5, SyntaxKind.UnspecifiedSyntaxKind);
        }
        set syntax_kind(value) {
            pb_1.Message.setField(this, 5, value);
        }
        get diagnostics() {
            return pb_1.Message.getRepeatedWrapperField(this, Diagnostic, 6);
        }
        set diagnostics(value) {
            pb_1.Message.setRepeatedWrapperField(this, 6, value);
        }
        get enclosing_range() {
            return pb_1.Message.getFieldWithDefault(this, 7, []);
        }
        set enclosing_range(value) {
            pb_1.Message.setField(this, 7, value);
        }
        static fromObject(data) {
            const message = new Occurrence({});
            if (data.range != null) {
                message.range = data.range;
            }
            if (data.symbol != null) {
                message.symbol = data.symbol;
            }
            if (data.symbol_roles != null) {
                message.symbol_roles = data.symbol_roles;
            }
            if (data.override_documentation != null) {
                message.override_documentation = data.override_documentation;
            }
            if (data.syntax_kind != null) {
                message.syntax_kind = data.syntax_kind;
            }
            if (data.diagnostics != null) {
                message.diagnostics = data.diagnostics.map(item => Diagnostic.fromObject(item));
            }
            if (data.enclosing_range != null) {
                message.enclosing_range = data.enclosing_range;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.range != null) {
                data.range = this.range;
            }
            if (this.symbol != null) {
                data.symbol = this.symbol;
            }
            if (this.symbol_roles != null) {
                data.symbol_roles = this.symbol_roles;
            }
            if (this.override_documentation != null) {
                data.override_documentation = this.override_documentation;
            }
            if (this.syntax_kind != null) {
                data.syntax_kind = this.syntax_kind;
            }
            if (this.diagnostics != null) {
                data.diagnostics = this.diagnostics.map((item) => item.toObject());
            }
            if (this.enclosing_range != null) {
                data.enclosing_range = this.enclosing_range;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.range.length)
                writer.writePackedInt32(1, this.range);
            if (this.symbol.length)
                writer.writeString(2, this.symbol);
            if (this.symbol_roles != 0)
                writer.writeInt32(3, this.symbol_roles);
            if (this.override_documentation.length)
                writer.writeRepeatedString(4, this.override_documentation);
            if (this.syntax_kind != SyntaxKind.UnspecifiedSyntaxKind)
                writer.writeEnum(5, this.syntax_kind);
            if (this.diagnostics.length)
                writer.writeRepeatedMessage(6, this.diagnostics, (item) => item.serialize(writer));
            if (this.enclosing_range.length)
                writer.writePackedInt32(7, this.enclosing_range);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Occurrence();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.range = reader.readPackedInt32();
                        break;
                    case 2:
                        message.symbol = reader.readString();
                        break;
                    case 3:
                        message.symbol_roles = reader.readInt32();
                        break;
                    case 4:
                        pb_1.Message.addToRepeatedField(message, 4, reader.readString());
                        break;
                    case 5:
                        message.syntax_kind = reader.readEnum();
                        break;
                    case 6:
                        reader.readMessage(message.diagnostics, () => pb_1.Message.addToRepeatedWrapperField(message, 6, Diagnostic.deserialize(reader), Diagnostic));
                        break;
                    case 7:
                        message.enclosing_range = reader.readPackedInt32();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Occurrence.deserialize(bytes);
        }
    }
    _Occurrence_one_of_decls = new WeakMap();
    scip.Occurrence = Occurrence;
    class Diagnostic extends pb_1.Message {
        constructor(data) {
            super();
            _Diagnostic_one_of_decls.set(this, []);
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], __classPrivateFieldGet(this, _Diagnostic_one_of_decls, "f"));
            if (!Array.isArray(data) && typeof data == "object") {
                if ("severity" in data && data.severity != undefined) {
                    this.severity = data.severity;
                }
                if ("code" in data && data.code != undefined) {
                    this.code = data.code;
                }
                if ("message" in data && data.message != undefined) {
                    this.message = data.message;
                }
                if ("source" in data && data.source != undefined) {
                    this.source = data.source;
                }
                if ("tags" in data && data.tags != undefined) {
                    this.tags = data.tags;
                }
            }
        }
        get severity() {
            return pb_1.Message.getFieldWithDefault(this, 1, Severity.UnspecifiedSeverity);
        }
        set severity(value) {
            pb_1.Message.setField(this, 1, value);
        }
        get code() {
            return pb_1.Message.getFieldWithDefault(this, 2, "");
        }
        set code(value) {
            pb_1.Message.setField(this, 2, value);
        }
        get message() {
            return pb_1.Message.getFieldWithDefault(this, 3, "");
        }
        set message(value) {
            pb_1.Message.setField(this, 3, value);
        }
        get source() {
            return pb_1.Message.getFieldWithDefault(this, 4, "");
        }
        set source(value) {
            pb_1.Message.setField(this, 4, value);
        }
        get tags() {
            return pb_1.Message.getFieldWithDefault(this, 5, []);
        }
        set tags(value) {
            pb_1.Message.setField(this, 5, value);
        }
        static fromObject(data) {
            const message = new Diagnostic({});
            if (data.severity != null) {
                message.severity = data.severity;
            }
            if (data.code != null) {
                message.code = data.code;
            }
            if (data.message != null) {
                message.message = data.message;
            }
            if (data.source != null) {
                message.source = data.source;
            }
            if (data.tags != null) {
                message.tags = data.tags;
            }
            return message;
        }
        toObject() {
            const data = {};
            if (this.severity != null) {
                data.severity = this.severity;
            }
            if (this.code != null) {
                data.code = this.code;
            }
            if (this.message != null) {
                data.message = this.message;
            }
            if (this.source != null) {
                data.source = this.source;
            }
            if (this.tags != null) {
                data.tags = this.tags;
            }
            return data;
        }
        serialize(w) {
            const writer = w || new pb_1.BinaryWriter();
            if (this.severity != Severity.UnspecifiedSeverity)
                writer.writeEnum(1, this.severity);
            if (this.code.length)
                writer.writeString(2, this.code);
            if (this.message.length)
                writer.writeString(3, this.message);
            if (this.source.length)
                writer.writeString(4, this.source);
            if (this.tags.length)
                writer.writePackedEnum(5, this.tags);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes) {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Diagnostic();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.severity = reader.readEnum();
                        break;
                    case 2:
                        message.code = reader.readString();
                        break;
                    case 3:
                        message.message = reader.readString();
                        break;
                    case 4:
                        message.source = reader.readString();
                        break;
                    case 5:
                        message.tags = reader.readPackedEnum();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary() {
            return this.serialize();
        }
        static deserializeBinary(bytes) {
            return Diagnostic.deserialize(bytes);
        }
    }
    _Diagnostic_one_of_decls = new WeakMap();
    scip.Diagnostic = Diagnostic;
})(scip = exports.scip || (exports.scip = {}));
